

*********************************************
****   Description   ************************
*********************************************

*This program estimates regressions of subsequent accounts opened at the Freedman's Savings Bank on an indicator for after the May 1870 charter amendment/branch with a strong advertising network. 


global cluster bank_id mo_date  

************************************************************
****   Panel A: Increase in Advertising ********************
************************************************************

//Advertising Panel
use "$Data/Bank_Advertising_Panel_December2024.dta", clear

*Keep FSB as the analysis is within branches of the Freedman's Savings Bank.
keep if FSB==1

// Create Variables
gen post_DC=(bank_city=="Washington" & post) 
gen DC=bank_city=="Washington"


// Regressions
eststo clear 
eststo: ppmlhdfe count_ads   post_DC [pw= black_pop_1870], absorb(bank_id mo_date) cluster($cluster)  
eststo: ppmlhdfe count_ads_aa   post_DC [pw= black_pop_1870], absorb(bank_id mo_date) cluster($cluster)  


************************************************************
****   Panel B: Advertising and Deposit Collection ********************
************************************************************

use "$Data/Account_Panel_Monthly_December2024.dta", clear
drop if mo_date > tm(1873m8) // restrict analysis to before FSB run 

// Create Variables
gen post = mo_date >= tm(1870m5)
gen post_DC=(branch=="Washington" & post) 
gen DC=branch=="Washington"
gen ln_accounts = ln(num_account)
gen ln_accounts_black = ln(num_account_black)
gen share_black =num_account_black/num_account
gen year = yofd(dofm(mo_date))
gen year_DC=year*DC
encode branch, gen(bank_id)

//Regressions
eststo: reghdfe ln_accounts    post [pw= black_pop_1870], absorb(branch ) cluster($cluster) 

eststo: reghdfe ln_accounts  post_DC  [pw= black_pop_1870], absorb(branch mo_date) cluster($cluster) 

eststo: reghdfe ln_accounts_black  post_DC   [pw= black_pop_1870], absorb(branch mo_date) cluster($cluster)  

eststo: reghdfe ln_accounts_black  post_DC [pw= black_pop_1870]  , absorb( mo_date bank_id##c.year) cluster($cluster)  
 
eststo: reghdfe share_black post_DC    [pw= black_pop_1870], absorb(branch mo_date) cluster($cluster)
 
esttab , keep(post post_DC )  ///
b(%10.2f) se(%10.2f) order(post post_DC ) ///
starlevels(* .10 ** .05 *** .01) nolegend ///
nonumbers ///
nonotes mlabels(none) /// 
stats(N r2 r2_p, fmt(%9.0fc %9.2f) label( "Observations" "$ R^{2} $" ))

 
